package com.wonders.frame.common.Enum;

public enum ResponseCodeEnum {
    SUCCESS(0, "请求成功！"),
    SYSTEM_ERROR(-1, "系统出错，请联系管理员！"),
    ROLECODE_REPEAT(-2,"角色代码重复"),
    MEDICINAL_NAME_REPEAT(-3,"药品名称和生产厂家重复"),
    ACCOUNT_REPEAT(-4,"账号重复"),
    CERTNUM_REPEAT(-5,"证件编号重复"),
    SELF_ACCOUNT(-6,"禁止转入转出自己的账号"),
    NO_DATA(-7,"暂无数据"),
    OLDPASSWORD_MISMATCH(-7,"原密码不正确"),
    EQUIPMENT_TYPE_IS_NULL(1001, "设备型号为空"),
    EQUIPMENT_CODE_IS_NULL(1002, "设备编码为空"),
    LONGITUDE_VALUE_IS_NULL(1003, "经度值为空"),
    LATITUDE_VALUE_TYPE_IS_NULL(1004, "纬度值为空为空"),
    VERIFICATION_VALUE_IS_NULL(1005, "校验值为空"),
    VERIFICATION_FAIL(1006, "校验失败"),
    DATA_IS_NULL(1007, "数据为空"),
    SUBTASK_ALREADY_END(3003, "子任务已结束"),
    VERIFY_MISMATCH(-8,"验证码不正确"),
    PASSWORD_MISTAKETOOMANY(-9,"密码错误次数超过三次 账号已锁定"),
    PASSWORD_EXPIRED(-9,"密码已过期"),
    ACCOUNT_NOT_EXIST(-10, "账号不存在！"),
    ACCOUNT_LOGOUT(-11,"账号被注销"),
    EQUITY_OCCUPY(-12,"权益占用 禁止删除"),
    NEED_LOGIN(-1000,"请登录！"),
    DIC_CODE_REPEAT(-1,"字典代码重复"),
    DIC_NAME_REPEAT(-1,"字典名称重复"),
    CLEARLOG_SUCCESS(0,"清除日志成功"),
    CLEARLOG_FAIL(-1,"清除日志失败")

    ;

    private Integer code;
    private String msg;
    private Object result;

    private ResponseCodeEnum() {
    }

    private ResponseCodeEnum(Integer code, String msg, Object result) {
        this.code = code;
        this.msg = msg;
        this.result = result;
    }

    private ResponseCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public ResponseCodeEnum setResult(Object result) {
        this.result = result;
        return this;
    }
    public Object getResult() {
        return result;
    }

    public String getMsg() {
        return this.msg;
    }

    public Integer getCode() {
        return this.code;
    }
}
